<template>
  <div>
    <headers></headers>
        <van-row>
            <van-col span="5">
              <left/>
            </van-col>
            <van-col span="19">
              <table border="1" cellspacing="0">
                <tr>
                  <td>文章</td>
                  <td>状态</td>
                </tr>
                <tr v-for="i in essaylist" :key="i">
                  <td>{{i.title}}</td>
                  <td v-if="i.status==1">正在审核</td>
                  <td v-if="i.status==2">审核成功</td>
                  <td v-if="i.status==3">审核失败</td>
                </tr>
              </table>
              <van-button to="addprize" text="去添加奖品"/>
              <van-button to="addarticle" text="去添加文章"/>
              <van-button to="fictionpass" text="去审核"/>
            </van-col>
         </van-row>
  </div>
</template>

<script>
import maxios from "@/http/axios";
import headers from '../comm/headers.vue'
import left from '../comm/left.vue'
export default {
  components:{
        'headers':headers,
        'left':left,
    },
  data() {
    return {
      essaylist: [],
      userid:localStorage.getItem('userid')
    }
  },
  methods:{
    getlist(){
      maxios('getessay?userid='+this.userid,'get').then(res=>{
        this.essaylist = res.list
      })
    },
  },
  mounted() {
    this.getlist()
  }
}
</script>

<style scoped>

</style>